﻿using Microsoft.EntityFrameworkCore;
using NewFormatProject.Infrastructure.Atrributes;
using NewFormatProject.Infrastructure.EFCore;
using NewFormatProject.Server.EFCore;
using NewFormatProject.Server.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace NewFormatProject.Server.Instances
{
    internal class ActionLogIOC
    {
        public ActionLogServerEF actionLogServerEF { get; set; }
    }
    [InjectClass]
    public class ActionLogServer : IActionLogServer
    {
        ActionLogIOC _actionLogIOC { get; set; }
        public ActionLogServer(DbContext dbContext)
        {
            _actionLogIOC = new ActionLogIOC
            {
                actionLogServerEF = new ActionLogServerEF(dbContext),
            };
        }
        public int Add(ActionLogs actionLog)
        {
            return _actionLogIOC.actionLogServerEF.Add(actionLog);
        }
    }
}
